package com.gdupt.service.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gdupt.entity.DataDictionary;
import com.gdupt.mapper.DataDictionaryMapper;
import com.gdupt.service.IDataDictionaryService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public  class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper,DataDictionary> implements IDataDictionaryService {
    @Autowired
    private DataDictionaryMapper dataDictionaryMapper;

    @Transactional
    @Override
    public boolean add(DataDictionary dataDictionary) {
        return dataDictionaryMapper.add(dataDictionary);
    }

    @Override
    public boolean edit(DataDictionary dataDictionary) {
        return dataDictionaryMapper.edit(dataDictionary);
    }

    @Override
    public List<DataDictionary> search(IPage page ,String dataType, String dataEntry, String dataValue)
    { return dataDictionaryMapper.search(page,dataType,dataEntry,dataValue); }

    @Override
    public boolean del(int id) {
        return dataDictionaryMapper.del(id);
    }

//    @Override
//    public boolean findId(int id) {
//        return  dataDictionaryMapper.findId(id);
//    }
}
